package chapter06.e6;

public class E6 {
    static String[] strs = {"aaa", "bbb", "ccc" };

    public static void main(String[] args) {
        //foreach 循环遍历数组
        for (String str : strs) {
            str = "ddd";
        }

        System.out.println("foreach 循环修改后的数组" +strs[0]+" "+strs[1]+" "+strs[2]);

        //for循环遍历数组

        for (int i = 0; i < strs.length; i++) {
            strs[i] = "ddd" ;
    }

        System.out.println("for 循环修改后的数组" +strs[0]+" "+strs[1]+" "+strs[2]);
    }
}
